package com.etouch.security.pojo.dto;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.etouch.security.pojo.entity.SysPermission;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author chenyunchang
 * @since 2020-10-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "SysUserDTO对象", description = "SysUserDTO对象")
public class SysUserDTO extends Model<SysUserDTO> {

    private static final long serialVersionUID = 1L;

    private Integer id;

    @ApiModelProperty(value = "用户名")
    private String username;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "手机号")
    private String phone;

    @ApiModelProperty(value = "真实姓名")
    private String realName;

    @ApiModelProperty(value = "状态: 1: 启用, 0: 停用")
    private Integer status;

    @ApiModelProperty(value = "最后一次登陆时间")
    private LocalDateTime lastLoginTime;

    @ApiModelProperty(value = "用户的角色信息")
    private List<SysRoleDTO> sysRoleDTOList;

    @ApiModelProperty(value = "用户所具有的权限")
    private List<SysPermission> sysPermissionList;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
